// import React, { useCallback, useEffect, useRef, useState } from 'react';
// import { message } from 'antd';
// import { isEqual, debounce } from 'lodash';
// import classNames from 'classnames';

// import support from './support';
// import keyCode from './keyCode';
// import formulaResolver, { RESOLVER_NAME } from './formulaResolver';
// import $ from './jquery';
// import './jquery.position';
// import ConditionSelector from './ConditionSelector';
// import ToolBar from './Toolbar';
// import treeValidate from './validate';
// import ValidateResult from './ValidateResult';
// import styles from './index.less';

// const noop = () => {};
// const INPUT_COMPOSITION_STATE = {
//     INPUTTING: true,
//     FINISHED: false
// };
// /* 公式合法的字符 */
// const LEGAL_REG = /^[0123456789+\-*/().@]*$/;

// const testDiv = document.createElement('div');
// testDiv.display = 'none';

// /* 获取范围的文本 */
// const getTextByRange = range => {
//     testDiv.innerHTML = '';
//     testDiv.appendChild(range.cloneContents());
//     return testDiv.innerText;
// };

// /* 覆盖显示条件名称的方法 */
// const { conditionResolver } = formulaResolver.resolver;
// Object.assign(conditionResolver, {
//     getDisplayName(conditionNode) {
//         const conditions = this.context || [];
//         const key = this.getKey(conditionNode);
//         const matchCondition = conditions.find(condition => condition.value === key);

//         if (matchCondition) {
//             return `@${matchCondition.name}`;
//         }

//         return matchCondition ? `@${matchCondition.name}` : conditionNode.value;
//     }
// });

// const FormulaEditor = ({
//     value = '',
//     onChange = noop,
//     conditions,
//     onFormulaChange = noop,
//     placeholder,
//     disabled = false
// }) => {
//     const [formula, setFormula] = useState(value);
//     const [formulaHtml, setFormulaHtml] = useState('');
//     const [formulaTree, setFormulaTree] = useState([]);
//     const [formulaMap, setFormulaMap] = useState({ displayPositionMap: {}, displayName: '' });
//     const [validateResult, setValidateResult] = useState([]);
//     const [positionInfo, setPositionInfo] = useState({});
//     const [showSelect, setShowSelect] = useState(false);
//     const editorRef = useRef();
//     const inputCompositionState = useRef(null);
//     const previousPositionInfoRef = useRef({});
//     const cleanPositionFlagRef = useRef(false);
//     const conditionRef = useRef(null);

//     const findDisplayPositionMap = index => (index <= 0 ? null : formulaMap.displayPositionMap[index - 1] || null);

//     const findNodeByPosition = (nodes, index) => {
//         const map = findDisplayPositionMap(index);
//         return map ? map.node : null;
//     };

//     const createPositionInfoFromFormulaMap = position => {
//         const { displayName } = formulaMap;

//         if (position === 0) {
//             return {
//                 before: '',
//                 after: displayName,
//                 position
//             };
//         }

//         if (position >= displayName.length) {
//             return {
//                 before: displayName,
//                 after: '',
//                 position
//             };
//         }

//         return {
//             before: displayName.substr(0, position),
//             after: displayName.substr(position),
//             position
//         };
//     };

//     /**
//      * 根据树与索引找到该元素
//      * @param treeNodeList 树
//      * @param index 索引
//      * @returns {Element|undefined}
//      */
//     const findElementByNodeListAndPosition = (treeNodeList, index) => {
//         const matchNode = findNodeByPosition(treeNodeList, index);
//         if (!matchNode) {
//             return undefined;
//         }

//         console.log(positionInfo);
//         console.log(matchNode);

//         let matchElement = editorRef.current.querySelector(`[data-start="${matchNode.start}"][data-end="${matchNode.end - 1}"]`);

//         if (!matchElement) {
//             return null;
//         }

//         if (matchNode.isLeaf) {
//             return matchElement;
//         }

//         if (
//             matchNode.name === RESOLVER_NAME.GROUP &&
//             formulaMap.nodeKeyDisplayPositionMap[matchNode.$$key].displayStart + 1 === index
//         ) {
//             matchElement = matchElement.querySelector(
//                 `[data-start="${matchNode.start}"][data-end="${matchNode.start}"]`
//             );
//         } else if (
//             matchNode.name === RESOLVER_NAME.GROUP &&
//             formulaMap.nodeKeyDisplayPositionMap[matchNode.$$key].displayEnd === index
//         ) {
//             matchElement = matchElement.querySelector(
//                 `[data-start="${matchNode.end - 1}"][data-end="${matchNode.end - 1}"]`
//             );
//         } else {
//             // 如果还有孩子节点则查找孩子节点
//             const childElement = matchElement.querySelector('span');
//             if (matchElement.querySelector('span')) {
//                 matchElement = childElement;
//             }
//         }

//         return matchElement;
//     };

//     /**
//      * 根据树与索引，聚焦到给定位置
//      * @param treeNodeList
//      * @param index
//      */
//     const focusTo = (treeNodeList, index) => {
//         console.group(`%c focus to ${index}`, 'color: #E82220');

//         // 聚焦到行首
//         if (index === 0) {
//             const range = document.createRange();
//             const matchElement = editorRef.current;
//             range.setStart(matchElement, 0);
//             range.setEnd(matchElement, 0);
//             range.collapse(false);

//             const selection = document.getSelection();
//             selection.removeAllRanges();
//             selection.addRange(range);

//             console.groupEnd();
//             return;
//         }

//         const matchNode = findNodeByPosition(treeNodeList, index);
//         if (!matchNode) {
//             console.groupEnd();
//             return;
//         }

//         const matchElement = findElementByNodeListAndPosition(treeNodeList, index);
//         if (matchElement == null) {
//             console.groupEnd();
//             return;
//         }

//         const startOffset = findDisplayPositionMap(index) ? findDisplayPositionMap(index).offset : 1;
//         const range = document.createRange();
//         try {
//             console.log('matchElement:', matchElement);
//             console.log('startOffset:', startOffset);

//             range.setStart(matchElement.firstChild, 0);
//             range.setEnd(matchElement.firstChild, startOffset);
//             range.collapse(false);

//             const selection = document.getSelection();
//             selection.removeAllRanges();
//             selection.addRange(range);
//         } catch (e) {
//             console.log(e);
//         }
//         console.groupEnd();
//     };

//     const getFormulaByCondition = node => `@${node.value}$`;

//     /** 从编辑器中获取位置信息 */
//     const getPositionInfoFromEditor = () => {
//         const editor = editorRef.current;

//         if (!editorRef.current || editor.childNodes.length === 0) {
//             return null;
//         }

//         const selection = document.getSelection();

//         // 获取光标前的文字
//         const beforeRange = document.createRange();
//         beforeRange.setStart(editor.childNodes[0], 0);
//         beforeRange.setEnd(selection.anchorNode, selection.anchorOffset);
//         const beforeText = getTextByRange(beforeRange);

//         // 获取光标后的文字
//         const afterRange = document.createRange();
//         afterRange.setStart(selection.anchorNode, selection.anchorOffset);
//         const lastChild = editor.childNodes[editor.childNodes.length - 1];
//         afterRange.setEnd(lastChild, lastChild.childNodes.length - 1 < 0 ? 0 : lastChild.childNodes.length);
//         const afterText = getTextByRange(afterRange);

//         return {
//             before: beforeText,
//             after: afterText,
//             position: beforeText.length
//         };
//     };

//     const getFormulaFromEditor = () => formulaResolver.convertToFormula(editorRef.current.innerHTML);

//     /** 从编辑器的内容中生成新公式 */
//     const createNewFormulaFromEditor = newFormula => {
//         const posInfo = getPositionInfoFromEditor();
//         if (!posInfo) {
//             return;
//         }
//         setFormula(newFormula);
//         setPositionInfo(posInfo);
//     };

//     const moveLeft = posInfo => {
//         console.group('moveLeft');
//         console.log('positionInfo:', posInfo);
//         if (posInfo.before.length <= 0) {
//             console.groupEnd();
//             return null;
//         }
//         const { position } = posInfo;
//         const leftNode = findNodeByPosition(formulaTree, position);
//         console.log('leftNode:', leftNode);
//         const displayName = conditionResolver.getDisplayName(leftNode);

//         const newPosition = position - (leftNode.value.startsWith('@') ? displayName.length : 1);
//         const newPositionInfo = createPositionInfoFromFormulaMap(newPosition);

//         setPositionInfo(newPositionInfo);
//         console.log('newPositionInfo:', newPositionInfo);
//         console.groupEnd();
//         return newPositionInfo;
//     };

//     const moveRight = posInfo => {
//         console.group('moveRight');
//         console.log('positionInfo:', posInfo);
//         // 已经在行尾时
//         if (posInfo.after.length <= 0) {
//             console.groupEnd();
//             return null;
//         }
//         const { after, position } = posInfo;

//         let displayName;
//         if (after.startsWith('@')) {
//             const rightNode = findNodeByPosition(formulaTree, position + 1);
//             displayName = conditionResolver.getDisplayName(rightNode);
//         } else {
//             displayName = after.substr(0, 1);
//         }

//         const newPosition = position + displayName.length;
//         const newPositionInfo = createPositionInfoFromFormulaMap(newPosition);

//         setPositionInfo(newPositionInfo);
//         console.log('newPositionInfo:', newPositionInfo);
//         console.groupEnd();
//         return newPositionInfo;
//     };

//     const delCondition = (posInfo, conditionNode) => {
//         const before = formula.substring(0, conditionNode.start);
//         const after = formula.substring(conditionNode.end);
//         const displayName = conditionResolver.getDisplayName(conditionNode);
//         const position = posInfo.position - displayName.length;

//         setFormula(before + after);
//         setPositionInfo({ position });
//     };

//     /**
//      * 由于onInput事件与onCompositionEnd事件在不同的浏览器之间执行的先后顺序不一样，
//      * 所以用debounce的方法来解决上面的问题，保证这两个事件只执行一次
//      * @type {DebouncedFunc<function(): void>}
//      */
//     const handleNewFormula = useCallback(
//         debounce(() => {
//             console.log('handleNewFormula');
//             let newFormula = getFormulaFromEditor();
//             // 移除非法字符
//             newFormula = newFormula.replace(/[^0123456789+\-*/().@$\w]+/gi, '');
//             console.log('new formula:', newFormula);

//             if (newFormula === formula) {
//                 const oldFormula = formula;
//                 const oldPosition = { ...positionInfo };
//                 setFormula(`${oldFormula}-`);
//                 console.log('oldFormula:', oldFormula);
//                 window.setTimeout(() => {
//                     setFormula(oldFormula);
//                     setPositionInfo(oldPosition);
//                 }, 0);
//             } else {
//                 createNewFormulaFromEditor(newFormula);
//             }
//         }, 50),
//         [editorRef.current, positionInfo, formula]
//     );

//     /** 在keydown 事件中处理向左、向右移动光标，
//      * 因为如果一直按住不放，会持续触发keydown事件，
//      * 而按键起来时都会触发一次keyup
//      */
//     const handleKeyDown = event => {
//         console.log('--------------------------');
//         console.log(`key down: ${event.which}`);
//         if (event.which === keyCode.DELETE) {
//             const currentNode = findNodeByPosition(formulaTree, positionInfo.position);

//             if (currentNode?.value.startsWith('@')) {
//                 event.preventDefault();
//                 delCondition(positionInfo, currentNode);
//             } else if (support.isIE) {
//                 handleNewFormula();
//             }
//             return;
//         }
//         if (event.which === keyCode.LEFT) {
//             console.debug('按下左键：');
//             event.preventDefault();
//             moveLeft(positionInfo);
//             return;
//         }

//         // 按下右键
//         if (event.which === keyCode.RIGHT) {
//             console.debug('按下右键：');
//             event.preventDefault();
//             moveRight(positionInfo);
//         }
//     };

//     const handleKeyPress = event => {
//         console.log('key press');
//         const key = event.key.replace(/（/gi, '(').replace(/）/gi, ')');
//         if (!LEGAL_REG.test(key)) {
//             message.error(`不允许输入字符：${event.key}，合法字符：0123456789+-*/().@`);
//             event.preventDefault();
//         }
//     };

//     const handleCompositionStart = (/* event */) => {
//         console.log('handleCompositionStart');
//         inputCompositionState.current = INPUT_COMPOSITION_STATE.INPUTTING;
//     };

//     const handleCompositionEnd = event => {
//         const inputData = event.data;

//         console.log('handleCompositionEnd');
//         console.log(`event.data: ${inputData}`);
//         inputCompositionState.current = INPUT_COMPOSITION_STATE.FINISHED;
//         handleNewFormula();
//     };

//     const handleKeyUp = (/* event */) => {
//         console.log('handleKeyUp:');
//     };

//     const handleOnInput = () => {
//         console.log('handle on input');
//         if (INPUT_COMPOSITION_STATE.INPUTTING === inputCompositionState.current) {
//             return;
//         }
//         handleNewFormula();
//     };

//     const handleBlur = (/* event */) => {
//         console.log('handleBlur');
//         if (support.isIE) {
//             const { activeElement } = document;
//             const editor = editorRef.current;
//             if (activeElement && editor.contains(activeElement) && !cleanPositionFlagRef.current) {
//                 console.log('不清除位置信息');
//             } else {
//                 setPositionInfo(null);
//                 cleanPositionFlagRef.current = false;
//                 console.log('清除位置信息');
//             }
//         }
//         previousPositionInfoRef.current = positionInfo;
//     };

//     const handleMouseOut = (/* event */) => {
//         if (support.isIE) {
//             console.log('need clean positionInfo');
//             cleanPositionFlagRef.current = true;
//         }
//     };

//     const handleSelect = (/* event */) => {
//         console.log('select');
//     };

//     const handleClick = (/* event */) => {
//         console.log('handle click');

//         const posInfo = getPositionInfoFromEditor();
//         if (!posInfo) {
//             return;
//         }

//         // 当点击条件的中间时
//         const node = findNodeByPosition(formulaTree, posInfo.position);
//         const displayMap = node && formulaMap.nodeKeyDisplayPositionMap[node.$$key];
//         // 如果点击的是条件点点，并且点击的是中间节点时
//         if (node && node.value.startsWith('@') && posInfo.position - displayMap.displayStart > 0) {
//             setPositionInfo(createPositionInfoFromFormulaMap(displayMap.displayEnd));
//         } else {
//             setPositionInfo(posInfo);
//         }
//     };

//     const handleFocus = event => {
//         console.log('----------------------');
//         console.log('handleFocus:', event.target);

//         if (support.isIE) {
//             console.log('editor:', editorRef?.current);
//             console.log('editor is focus element:', editorRef?.current === event.target);
//             console.log('active element:', document.activeElement);
//             console.log(`current position: ${JSON.stringify(getPositionInfoFromEditor())}`);
//             console.log(`positionInfo:${JSON.stringify(positionInfo)}`);

//             const currentPosition = getPositionInfoFromEditor();
//             const notSamePosition = !isEqual(positionInfo, currentPosition);
//             if (positionInfo == null) {
//                 setPositionInfo(currentPosition);
//             } else if (notSamePosition) {
//                 console.log(`1 set position:${JSON.stringify({ ...positionInfo })}`);
//                 setPositionInfo({ ...positionInfo });
//             }
//         }
//     };

//     const handleSelectCondition = condition => {
//         if (!condition) {
//             return;
//         }
//         const previousPositionInfo = previousPositionInfoRef.current;
//         const node = findNodeByPosition(formulaTree, previousPositionInfo.position);
//         console.log('formula:\t', formula);
//         console.log('node:\t', node);
//         console.log('condition:\t', condition);

//         const nodeFormula = getFormulaByCondition(condition);
//         const beforeText = (formula ? formula.substr(0, node.start) : '') + nodeFormula;
//         const afterText = formula ? formula.substr(node.end) : '';
//         const newFormula = beforeText + afterText;
//         const newNode = {
//             name: RESOLVER_NAME.CONDITION,
//             value: nodeFormula
//         };

//         const displayName = conditionResolver.getDisplayName(newNode);
//         const newPosition = previousPositionInfo.position + displayName.length - (node.value.startsWith('@') ? 1 : 0);

//         console.log(`newFormula:\t__${+newFormula}___`);
//         setFormula(newFormula);
//         setPositionInfo({
//             before: beforeText,
//             after: afterText,
//             position: newPosition
//         });
//     };

//     const handleSelectKeyUp = (event, oldValue) => {
//         const { target } = event;

//         if (target.value || oldValue) {
//             return true;
//         }

//         let currentNode;
//         switch (event.which) {
//             case keyCode.DELETE: // 按下删除键
//                 currentNode = findNodeByPosition(formulaTree, previousPositionInfoRef.current.position);
//                 delCondition(previousPositionInfoRef.current, currentNode);
//                 return false;

//             case keyCode.LEFT: // 按下左键
//                 setShowSelect(false);
//                 moveLeft(previousPositionInfoRef.current);
//                 return false;

//             case keyCode.RIGHT: // 按下右键
//                 moveRight(previousPositionInfoRef.current);
//                 return false;

//             case keyCode.ESC: // 按下esc
//                 setPositionInfo({ ...positionInfo });
//                 return false;

//             default:
//                 return true;
//         }
//     };

//     const afterShowSelect = () => {
//         const $matchElement = $(findElementByNodeListAndPosition(formulaTree, positionInfo.position));
//         const $conditionElement = $(conditionRef.current);

//         if ($matchElement.length > 0 && $conditionElement.length > 0) {
//             $($conditionElement).position({
//                 my: 'left top+10',
//                 at: 'left bottom',
//                 of: $matchElement,
//                 collision: 'flipfit'
//             });
//         }
//     };

//     const afterHideSelect = () => {
//         if (showSelect) {
//             setShowSelect(false);
//         }
//     };

//     /**
//      * 处理工具栏的选择
//      * @param selectedData.type 选择类型
//      * @param selectedData.value 选择的数据
//      */
//     const handleToolbarSelect = selectedData => {
//         if (disabled) {
//             return;
//         }
//         const { type, value: data } = selectedData;
//         console.group('handleToolbarSelect');
//         const previousPositionInfo = previousPositionInfoRef.current;
//         console.log('previousPositionInfo:', previousPositionInfo);
//         const previousPosition = previousPositionInfo.position || 0;

//         let addFormula;
//         let newPositionInfo;
//         let newNode;
//         let newNodeDisplayName;

//         switch (type) {
//             case 'number':
//             case 'operator':
//                 addFormula = String(data);
//                 newNodeDisplayName = String(data);
//                 break;

//             case 'condition':
//                 addFormula = getFormulaByCondition(data);
//                 newNode = {
//                     name: RESOLVER_NAME.CONDITION,
//                     value: addFormula
//                 };
//                 newNodeDisplayName = conditionResolver.getDisplayName(newNode);
//                 break;
//             default:
//                 addFormula = '';
//                 break;
//         }

//         if (!addFormula) {
//             console.groupEnd();
//             return;
//         }

//         // 在行首时
//         if (previousPosition === 0) {
//             newPositionInfo = { position: newNodeDisplayName.length };
//             setFormula(addFormula + formula);
//             previousPositionInfoRef.current = { ...newPositionInfo };
//             setPositionInfo(newPositionInfo);
//             return;
//         }

//         const node = findNodeByPosition(formulaTree, previousPositionInfo.position);
//         const element = findElementByNodeListAndPosition(formulaTree, previousPositionInfo.position);
//         console.log('handleToolbarSelect node:', node);
//         const nodeText = element.innerText;
//         const { offset } = formulaMap.displayPositionMap[previousPositionInfo.position - 1];
//         element.innerHTML = nodeText.substring(0, offset) + addFormula + nodeText.substring(offset);
//         const newFormula = getFormulaFromEditor();
//         createNewFormulaFromEditor(newFormula);
//         const newPosition = previousPosition + String(newNodeDisplayName).length;
//         newPositionInfo = { position: newPosition };
//         previousPositionInfoRef.current = { ...newPositionInfo };
//         setPositionInfo(newPositionInfo);

//         console.log('newFormula:', newFormula);
//         console.log('newPosition:', newPosition);

//         console.groupEnd();
//     };

//     useEffect(() => {
//         const newFormulaTree = formulaResolver.resolve(formula);
//         const newFormulaHtml = formulaResolver.render(newFormulaTree, true);
//         setFormulaTree(newFormulaTree);
//         setFormulaHtml(newFormulaHtml);
//         const newFormulaMap = formulaResolver.mapping(newFormulaTree);
//         setFormulaMap(newFormulaMap);
//         const newValidateResult = treeValidate(newFormulaTree);
//         setValidateResult(newValidateResult);

//         onChange(formula);
//         onFormulaChange({
//             formula,
//             formulaTree: newFormulaTree,
//             formulaHtml: newFormulaHtml,
//             formulaMap: newFormulaMap,
//             validateResult: newValidateResult
//         });

//         console.group('%c公式新值', 'color: #E82220');
//         console.log('new formula:', formula);
//         console.log('new formulaTree:', newFormulaTree);
//         // console.log('new formulaHtml:', newFormulaHtml);
//         console.log('new displayPositionMap:', newFormulaMap);
//         console.log('new validateResult:', treeValidate(newFormulaTree));
//         console.groupEnd();
//     }, [formula]);

//     useEffect(() => {
//         // 当只设置position，而没有设置before与after时
//         if (positionInfo?.position) {
//             console.log('update positionInfo');
//             Object.assign(positionInfo, createPositionInfoFromFormulaMap(positionInfo?.position));
//         }
//     }, [formulaMap, positionInfo]);

//     useEffect(() => {
//         const previousPositionInfo = previousPositionInfoRef.current;
//         // 当只设置position，而没有设置before与after时
//         if (previousPositionInfo?.position) {
//             console.log('update previousPositionInfo');
//             Object.assign(previousPositionInfo, createPositionInfoFromFormulaMap(previousPositionInfo?.position));
//         }
//     }, [formulaMap, previousPositionInfoRef.current]);

//     useEffect(() => {
//         if (!formulaTree || positionInfo?.position == null) {
//             return;
//         }

//         // 当只设置position，而没有设置before与after时
//         if (positionInfo?.position && positionInfo.before == null && positionInfo.after == null) {
//             Object.assign(positionInfo, createPositionInfoFromFormulaMap(positionInfo?.position));
//         }

//         focusTo(formulaTree, positionInfo.position);

//         const node = findNodeByPosition(formulaTree, positionInfo.position);

//         if (node?.value?.startsWith('@') && !disabled) {
//             setShowSelect(true);
//             previousPositionInfoRef.current = positionInfo;
//         }
//     }, [formulaTree, positionInfo]);

//     useEffect(() => {
//         formulaResolver.resolver.conditionResolver.setContext(conditions || []);
//         const newFormulaHtml = formulaResolver.render(formulaTree, true);
//         setFormulaHtml(newFormulaHtml);
//         const newFormulaMap = formulaResolver.mapping(formulaTree);
//         setFormulaMap(newFormulaMap);
//         const newValidateResult = treeValidate(formulaTree);
//         setValidateResult(newValidateResult);
//     }, [conditions]);

//     useEffect(() => {
//         setFormula(value);
//     }, [value]);

//     useEffect(() => {
//         // 由于ie11不支持oninput整件，而别的浏览器也不支持textinput事件，
//         // 所以在ie中textinput做oninput的功能
//         if (support.isIE && editorRef.current) {
//             editorRef.current.addEventListener('textinput', handleOnInput);

//             return () => {
//                 editorRef.current.removeEventListener('textinput', handleOnInput);
//             };
//         }
//         return noop;
//     }, [editorRef.current]);

//     return (
//         <div className={classNames(styles.editorBox, { [styles.editorBoxDisabled]: disabled })}>
//             <ToolBar conditions={conditions} onSelect={handleToolbarSelect} />
//             <div className="editor-body">
//                 <div
//                     ref={editorRef}
//                     dangerouslySetInnerHTML={{ __html: formulaHtml }}
//                     contentEditable={disabled ? 'false' : 'true'}
//                     suppressContentEditableWarning
//                     onKeyDown={handleKeyDown}
//                     onKeyPress={handleKeyPress}
//                     onCompositionStart={handleCompositionStart}
//                     onCompositionEnd={handleCompositionEnd}
//                     onKeyUp={handleKeyUp}
//                     onClick={handleClick}
//                     onFocus={handleFocus}
//                     onInput={handleOnInput}
//                     onBlur={handleBlur}
//                     onMouseOut={handleMouseOut}
//                     onSelect={handleSelect}
//                     className="editor theme-light"
//                     draggable="false"
//                 />
//                 {!formula ? (
//                     <div className="editor-placeholder">
//                         {placeholder || (
//                             <>
//                                 <div>请键入自定义公式值</div>
//                                 <div>键入@键会自动弹出条件选择</div>
//                             </>
//                         )}
//                     </div>
//                 ) : null}
//             </div>
//             <ConditionSelector
//                 ref={conditionRef}
//                 conditions={conditions}
//                 showSelect={showSelect}
//                 onChange={handleSelectCondition}
//                 onKeyUp={handleSelectKeyUp}
//                 afterShowSelect={afterShowSelect}
//                 afterHideSelect={afterHideSelect}
//                 placeholder="请选择（按ESC关闭）"
//             />
//             <ValidateResult result={validateResult} tree={formulaTree} treeMapping={formulaMap} />
//         </div>
//     );
// };

export default {};
